package com.workman.dao.impl;

import com.workman.dao.UserDao;
import org.springframework.stereotype.Component;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @description:
 * @author: gaochao
 * @time: 2020/11/21 16:27
 */
@Component
public class UserDaoImpl extends BaseDaoImpl implements UserDao {



    public Map<String,String> selectUserByName(String userNm){
        Map<String, Object> param = new HashMap<>();
        param.put("userName", userNm);
        List<Map<String,String>> objects = sqlSessionTemplate.selectList("com.workman.dao.mapper.UserMapper.selectUserByName", param);
        if(objects !=null && objects.size()>0){
            return objects.get(0);
        }
        return null;

    }



}
